package mapper;

import org.apache.ibatis.annotations.Param;
import pojo.Comment;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer commentId);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<Comment> selectByArticleId(Integer articleId);

    List<Comment> selectByReplyUserIdAndNotDel(Integer userId);

    List<Comment> selectByReplyUserIdAndCommentStatus(@Param("userId") Integer userId, @Param("status") int status);

    int selectCountByArticleId(Integer articleId);

    int updateCommentStatusByReplyUserId(@Param("replyUserId") Integer replyUserId, @Param("status") int status);
}